package com.xnyzc.lhy.didi.tongcheng.penum;

import com.xnyzc.lhy.common.entity.PEnum;

/**
 * 同城错误码枚举
 *
 * @Author: wangshuo
 * @Date: 2019/10/08 17:47
 */
public enum ETongChengErrorCode implements PEnum<Integer> {
    //成功标志
    success(200, "success"),
    //参数及数据错误
    clientId_null(201, "clientId 不能为空"),
    clientId_err(202, "clientId 标识不正确"),
    sign_null(203, "sign 不能为空"),
    orderid_null(204, "orderid 不能为空"),
    supplierCode_null(205, "supplierCode 不能为空"),
    tcOrderStatus_null(206, "tcOrderStatus 不能为空"),
    sign_err(300, "签名验证不正确"),
    order_repeat(207,"已有发票"),
    order_is_null(208,"暂无发票"),
    invoiceid_null(209,"invoiceid不能为空"),
    invoiceid_is_access(210,"申请发票失败"),
    invoiceid_look_no_access(211,"开票失败,请查看申请开票信息"),
    orderis_null(212, "乘客订单信息不存在"),

    dataException(188,"数据异常,请联系客服处理!"),
    driverInfoIsNull(199,"未获取到司机位置信息,请重试"),
    city_null(1,"fail");


    int value;
    String desc;

    ETongChengErrorCode(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public String getDesc() {
        return desc;
    }

    @Override
    public Integer getValue() {
        return value;
    }

    @Override
    public String toString() {
        return name();
    }

    @Override
    public String toChString() {
        return desc;
    }

    public String toMessage() {
        String errorMessage = this.value + "," + this.desc;
        return errorMessage;
    }
}
